#ifdef USE_EIGEN3
#include <Element.d/NonLinearity.d/NLTetrahedral.h>

template<>
const double SolidElementTemplate<Tet4LagrangePolynomialShapeFunction,4,1>
::nodeRefCoords[4][3] = 
  {{0.0,0.0,0.0},{1.0,0.0,0.0},{ 0.0,1.0,0.0},{0.0,0.0,1.0}};

template<>
const double SolidElementTemplate<Tet10LagrangePolynomialShapeFunction,10,15>
::nodeRefCoords[10][3] = 
  {{0.0,0.0,0.0},{1.0,0.0,0.0},{0.0,1.0,0.0},{0.0,0.0,1.0},
   {0.5,0.0,0.0},{0.5,0.5,0.0},{0.0,0.5,0.0},
   {0.0,0.0,0.5},{0.5,0.0,0.5},{0.0,0.5,0.5}};

template<>
void
SolidElementTemplate<Tet4LagrangePolynomialShapeFunction,4,1>
::getGaussPointAndWeight(int n, double *point, double &weight)
{
  // 1 point (degree 1) useful for TET4 stiffness 
  double w_save[1] = {
    1.0000000000000000000 };
  double xyz_save[3*1] = {
    0.25000000000000000000,  0.25000000000000000000,  0.25000000000000000000 };

  point[0] = xyz_save[3*n+0];
  point[1] = xyz_save[3*n+1];
  point[2] = xyz_save[3*n+2];
  weight = w_save[n]/6;
}

template<>
void
SolidElementTemplate<Tet10LagrangePolynomialShapeFunction,10,4>
::getGaussPointAndWeight(int n, double *point, double &weight)
{
  // 4 point (degree 2) useful for TET4 mass and TET10 stiffness
  double w_save[4] = {
    0.25000000000000000000,
    0.25000000000000000000,
    0.25000000000000000000,
    0.25000000000000000000 };
  double xyz_save[3*4] = {
    0.58541019662496845446,  0.13819660112501051518,  0.13819660112501051518,
    0.13819660112501051518,  0.58541019662496845446,  0.13819660112501051518,
    0.13819660112501051518,  0.13819660112501051518,  0.58541019662496845446,
    0.13819660112501051518,  0.13819660112501051518,  0.13819660112501051518 };

  point[0] = xyz_save[3*n+0];
  point[1] = xyz_save[3*n+1];
  point[2] = xyz_save[3*n+2];
  weight = w_save[n]/6;
}

template<>
void
SolidElementTemplate<Tet10LagrangePolynomialShapeFunction,10,15>
::getGaussPointAndWeight(int n, double *point, double &weight)
{
  double w_save[15] = {
    0.071937083779018620010,
    0.071937083779018620010,
    0.071937083779018620010,
    0.071937083779018620010,
    0.069068207226272385281,
    0.069068207226272385281,
    0.069068207226272385281,
    0.069068207226272385281,
    0.052910052910052910053,
    0.052910052910052910053,
    0.052910052910052910053,
    0.052910052910052910053,
    0.052910052910052910053,
    0.052910052910052910053,
    0.11851851851851851852 };
  double xyz_save[3*15] = {
    0.724086765841830901630,  0.091971078052723032789,  0.091971078052723032789,
    0.091971078052723032789,  0.724086765841830901630,  0.091971078052723032789,
    0.091971078052723032789,  0.091971078052723032789,  0.724086765841830901630,
    0.091971078052723032789,  0.091971078052723032789,  0.091971078052723032789,
    0.040619116511110274837,  0.319793627829629908390,  0.319793627829629908390,
    0.319793627829629908390,  0.040619116511110274837,  0.319793627829629908390,
    0.319793627829629908390,  0.319793627829629908390,  0.040619116511110274837,
    0.319793627829629908390,  0.319793627829629908390,  0.319793627829629908390,
    0.443649167310370844260,  0.443649167310370844260,  0.056350832689629155741,
    0.443649167310370844260,  0.056350832689629155741,  0.443649167310370844260,
    0.443649167310370844260,  0.056350832689629155741,  0.056350832689629155741,
    0.056350832689629155741,  0.443649167310370844260,  0.443649167310370844260,
    0.056350832689629155741,  0.443649167310370844260,  0.056350832689629155741,
    0.056350832689629155741,  0.056350832689629155741,  0.443649167310370844260,
    0.250000000000000000000,  0.250000000000000000000,  0.250000000000000000000 };

  point[0] = xyz_save[3*n+0];
  point[1] = xyz_save[3*n+1];
  point[2] = xyz_save[3*n+2];
  weight = w_save[n]/6;
}
#endif
